package com.cs.code.model;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 * @author wind
 * @date    2025/1/21 17:02
 * @version v1.0
 */
public class CsIndex implements Serializable {

    /**
     * 索引名称
     */
    private String name;

    /**
     * 表名
     */
    private String tableName;

    /**
     * 列名
     */
    private String columnName;

    /**
     * 是否唯一索引
     */
    private boolean unique;

    /**
     * 索引类型（如主键、唯一索引等）
     * *      <LI> tableIndexStatistic - this identifies table statistics that are
     *      *           returned in conjuction with a table's index descriptions
     *      *      <LI> tableIndexClustered - this is a clustered index
     *      *      <LI> tableIndexHashed - this is a hashed index
     *      *      <LI> tableIndexOther - this is some other style of index
     */
    private String type;

    /**
     * 索引的限定符（通常是数据库名或模式名）
     */
    private String indexQualifier;

    /**
     * 列的排序方向（A 表示升序，D 表示降序）
     */
    private String sort;

    /**
     * ORDINAL_POSITION,列在索引中的位置。
     */
    private String position;

    /**
     * 索引的基数（即索引中不同值的数量）。
     */
    private Integer cardinality;

    /**
     * 索引所占用的页数
     */
    private Integer page;

    private String condition;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public boolean isUnique() {
        return unique;
    }

    public void setUnique(boolean unique) {
        this.unique = unique;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getIndexQualifier() {
        return indexQualifier;
    }

    public void setIndexQualifier(String indexQualifier) {
        this.indexQualifier = indexQualifier;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public Integer getCardinality() {
        return cardinality;
    }

    public void setCardinality(Integer cardinality) {
        this.cardinality = cardinality;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public String getCondition() {
        return condition;
    }

    public void setCondition(String condition) {
        this.condition = condition;
    }

    @Override
    public String toString() {
        return "CsIndex{" +
                "name='" + name + '\'' +
                ", tableName='" + tableName + '\'' +
                ", columnName='" + columnName + '\'' +
                ", unique=" + unique +
                ", type='" + type + '\'' +
                ", indexQualifier='" + indexQualifier + '\'' +
                ", sort='" + sort + '\'' +
                ", position='" + position + '\'' +
                ", cardinality=" + cardinality +
                ", page=" + page +
                ", condition='" + condition + '\'' +
                '}';
    }
}
